<template>
	<view class="search-positioning">
		<view class="search-bar" @click="toSignSeach">
			<image class="search-icon" src="/static/u2326.png" mode=""></image>
			<!-- <input type="text" placeholder="搜索机构/医生" placeholder-style="color:#999">
			
			</input> -->
			<text style="color:#999 ;margin-left: 24rpx;">搜索机构/医生</text>
		</view>
	</view>
	<!-- 滑动内容 -->
	<view class="hostpital-color">
		<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" :scroll-with-animation="true">
			<view v-for="item in teamItem" :key="item._id" class="sign-box" @click="toSignPath(item._id)"
				style="margin-left: 30rpx; margin-right: 30rpx;">
				<image :src="item.avatar" mode="" style="width: 160rpx; height: 160rpx;"></image>
				<view class="" style="display: flex; justify-content: space-between; align-items: center;">
					<view style="	display: flex;
									flex-direction:column;
									justify-content: space-between;
									align-items: flex-start;
									height: 200rpx;
									flex: 1;
									margin-left: 40rpx;
									">
						<text class="sign-text">{{item.name}}</text>
						<view class="signTop-text2">{{ item.organizationId?.name }}</view>
						<view class="sign-img">
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<image src="/static/icons/star.png" mode="" style="width: 56rpx; height: 60rpx;"></image>
							<span class="yellow-span">5.o</span>
						</view>

					</view>
					<image src="/static/icons/u1334.png" mode="" class="hostpital-box-image" style=""></image>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script setup>
	import {

		ref
	} from 'vue';
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import {
		getOrganizationApi
	} from '../../../api/organization';
	import {
		getTeamApi
	} from '../../../api/sign';


	const teamItem = ref([]);


	function getTeam(organizationId) {
		getTeamApi({

			})
			.then(res => {
				if (res.code == 200) {
					teamItem.value = res.data.rows;
				}
			})
	}


	onLoad(() => {

		getTeam()
	});

	function toSignSeach() {

		uni.reLaunch({
			url: '/SignPackage/pages/sign-search/sign-search'
		})
	}
	const hospitalsList = ref([]);


	function toSignPath(_id) {
		uni.navigateTo({
			url: '/SignPackage/pages/team-doctor/team-doctor?_id=' + _id
		})
	}
</script>

<style lang="scss">
	.search-input {
		flex: 1;
		font-size: 28rpx;
	}

	.search-positioning {
		position: relative;
		height: 100rpx;
	}

	.search-icon-a {
		width: 160rpx;
		height: 160rpx;
	}

	.hostpital-box-image {
		width: 22rpx;
		height: 22rpx;
	}

	.hostpital-box {
		width: 670rpx;
		height: 226rpx;
		border: 1px solid #eee;
		display: flex;
		align-items: center;
		background-color: rgba(255, 255, 255, 1);
		margin: 20rpx auto;

	}

	.hostpital-box-span {
		width: 350rpx;
		text-align: left;
		height: 125rpx;

	}

	.scroll-Y {
		position: absolute;
		top: 100rpx;
		height: calc(100% - 100rpx);
		/* 占满剩余高度 */
		// padding: 0 20rpx;
		background-color: #f6fafd;
	}

	.hostpital-color {
		background-color: #f6fafd;

	}

	.hostpital-span {
		margin-top: 20rpx;
		font-size: 22rpx;
		color: #999999;
	}

	.search-icon {
		width: 30rpx;
		height: 30rpx;
		margin-right: 10rpx;
	}

	.search-bar {
		display: flex;
		align-items: center;
		padding: 10rpx 20rpx;
		background-color: #fff;
		border-radius: 30rpx;
		margin: 20rpx;
		border: 1px solid #eee;
		width: 602rpx;
		height: 52rpx;
		margin: 20rpx auto;
	}

	.sign-box {
		height: 268rpx;
		border-radius: 12rpx;
		display: flex;
		align-items: center;
		background-color: rgba(255, 255, 255, 1);
		margin: 20rpx auto;
		padding-left: 20rpx;
	}

	.sign-box-1 {
		height: 268rpx;
		border: 1px solid #eee;
		display: flex;
		align-items: center;
		background-color: rgba(255, 255, 255, 1);
		margin: 20rpx auto 40rpx;
		padding-right: 30rpx;
		padding-left: 30rpx;
	}

	.signColor {
		background-color: #f6fafd;
	}

	.signTop {
		display: flex;
		padding-top: 40rpx;
	}

	.scroll-Y {
		position: absolute;
		top: 0;
		height: 100%;
		background-color: #f6fafd;
	}

	.yellow-span {
		color: #FDDB78;
		font-size: 28rpx;
		line-height: 56rpx;

	}

	.hostpital-box-image {
		width: 22rpx;
		height: 22rpx;
	}

	.signTop-text {
		font-weight: 1000rpx;
		font-style: normal;
		font-size: 36rpx;
		line-height: 56rpx;

	}

	.sign-img {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-left: -10rpx;
	}

	.intro-text {
		color: #999999;
		line-height: 24px;
		font-size: 24rpx;
		margin-top: 20rpx;
		padding-bottom: 40rpx;
	}

	.intro-container {
		margin: 50rpx 20rpx 50rpx;
	}


	.signTop-text2 {
		font-size: 24rpx;
		color: #999999;
		line-height: 27px;
		width: 400rpx;
		height: 54rpx;
	}

	.signTop-hospital {
		width: 240rpx;
		height: 240rpx;
	}

	.sign-text {
		font-weight: 400;
		font-style: normal;
	}
</style>